tools/xenstore: use treewalk for deleting nodes
authorJuergen Gross <jgross@suse.com>
Tue, 13 Sep 2022 05:35:12 +0000 (07:35 +0200)
committerAndrew Cooper <andrew.cooper3@citrix.com>
Tue, 1 Nov 2022 13:05:44 +0000 (13:05 +0000)
commitea16962053a6849a6e7cada549ba7f8c586d85c6
treeca3917d03e6d6564ac756014fb6b34d5b58ea68d
parenta07cc0ec60612f414bedf2bafb26ec38d2602e95
tools/xenstore: use treewalk for deleting nodes

Instead of doing an open tree walk using call recursion, use
walk_node_tree() when deleting a sub-tree of nodes.

This will reduce code size and avoid many nesting levels of function
calls which could potentially exhaust the stack.

This is part of XSA-418 / CVE-2022-42321.

Signed-off-by: Juergen Gross <jgross@suse.com>
Acked-by: Julien Grall <jgrall@amazon.com>
tools/xenstore/xenstored_core.c